import { defineConfig } from '@soybeanjs/eslint-config';
import vueParser from 'vue-eslint-parser';

export default defineConfig(
  { vue: true, unocss: true },
  {
    languageOptions: {
      parser: vueParser,
      parserOptions: {
        parser: '@typescript-eslint/parser',
        ecmaVersion: 2021,
        sourceType: 'module',
        ecmaFeatures: {
          jsx: true,
        },
      },
    },
    rules: {
      'vue/multi-word-component-names': [
        'warn',
        {
          ignores: ['index', 'App', 'Register', '[id]', '[url]'],
        },
      ],
      'vue/component-name-in-template-casing': [
        'warn',
        'PascalCase',
        {
          registeredComponentsOnly: false,
          ignores: ['/^icon-/'],
        },
      ],
      'unocss/order-attributify': 'off',
      '@typescript-eslint/no-unused-vars': 'off',
      'vue/no-static-inline-styles': 'off',
      '@typescript-eslint/no-shadow': 'off',
      'vue/no-template-target-blank': 'off',
      'no-plusplus': 'off',
      'vue/no-unused-emit-declarations': 'off',
      'vue/no-unused-properties': 'off',
      'vue/multi-word-component-names': 'off',
      'no-implicit-coercion': 'off',
      'no-constant-binary-expression': 'off',
      'no-constant-condition': 'off',
      'vue/no-mutating-props': 'off',
    },
  }
);
